﻿using Present.Commands.Async.Actions;

namespace Present.Commands.Fluent
{
    public static class AsyncAction
    {
        public static ActionBuilder<TParameter, TResult> From<TParameter, TResult>(IAsyncAction<TParameter, TResult> action)
        {
            return new SimpleActionBuilder<TParameter, TResult>(()=>action);
        }

        public static CompositeAsyncActionBuilder Multiple()
        {
            return new CompositeAsyncActionBuilder();
        }

        public static DelegateAsyncActionBuilder<TParameter, TResult> FromDelegates<TParameter, TResult>()
        {
            return new DelegateAsyncActionBuilder<TParameter, TResult>();
        }

        public static DelegateAsyncActionBuilder<object, object> FromDelegates()
        {
            return FromDelegates<object, object>();
        }
    }
}